<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <style>
        .mul-ellipsis {
            overflow: hidden;
            text-overflow: ellipsis;
            display: -webkit-box;
            -webkit-line-clamp: 2;
            -webkit-box-orient: vertical;
        }
        .container{
            padding: 0;
            margin: 0;
            width: 1000px;
        }
        .left{
            background:red;
            width: 200px;
        }
        .right{
            background:blue;
        }
        table{
            /*width:100%;*/
            /*height:200px;*/
            border-collapse: collapse;
        }
        .table{
            margin-top:20px;
            display: table;
            width: 100%;
            height:200px;
        }
        .table-row{
            display: table-row;
        }
        .table-row:nth-of-type(2n){
            background-color: #ccc;
        }
        .table-cell{
            vertical-align: center;
            display: table-cell;
            vertical-align: middle;
            text-align: center;
        }
        .table-cell.custom{
            border: 1px solid #333;
            width: 25%;
        }
        .table.test{
            width: fit-content;
            height: fit-content;
        }
        .table.test .table-row{
            height: 50px;
        }
        .table.test .table-cell{
            width: 100px;
        }
    </style>
</head>
<body>
    <div class="container">
        <table>
            <tr>
                <td class="left">
                    <p>左边</p>
                    <p>1111111111111111111111111111111</p>
                    <p>1111111111111111111111111111111</p>
                    <p>1111111111111111111111111111111</p>
                </td>
                <td class="right">右</td>
            </tr>
        </table>
        <div class="table">
            <div class="table-row">
                <div class="left table-cell" style="vertical-align: middle">
                    <p>左边</p>
                    <!--<p>1111111111111111111111111111111</p>-->
                    <!--<p>1111111111111111111111111111111</p>-->
                    <!--<p>1111111111111111111111111111111</p>-->
                </div>
                <div class="right table-cell">
                    <p>右</p>

                </div>
            </div>
        </div>
        <div class="table">
            <div class="table-row">
                <div class="table-cell" style="background: red;width: 200px">
                    <p>11111</p>
                </div>
                <div class="table-cell">ccc</div>
                <div class="table-cell">ddd</div>
                <div class="table-cell" style="background-color: yellow;width: 100px">
                    <p>3333</p>
                </div>
            </div>
        </div>
    </div>

    <br>
    <br>

    <div class="table test">
        <div class="table-row" >
            <div class="table-cell" style="background-color: red">1</div>
            <div class="table-cell" style="background-color: yellow">2</div>
            <div class="table-cell" style="background-color: blue">3</div>
        </div>
        <div class="table-row">
            <div class="table-cell" style="background-color: #00aa88">4</div>
            <div class="table-cell" style="background-color: #cccccc">5</div>
            <div class="table-cell" style="background-color: #1cffff">6</div>
        </div>
    </div>

    <br>
    <br>

   <p>1111111111111</p>
   <table>
       <style media="screen">
           td{
               width: 50px;
               height: 50px;
           }
           .item1{

           }
       </style>
       <tr>
           <td style="background-color: red" colspan="2">
               <div >1</div>
           </td>
           <td style="background-color: #72ff57">
               <div >2</div>
           </td>
       </tr>
       <tr>
           <td style="background-color: #ffe62b" rowspan="2">
               <div >3</div>
           </td>
           <td style="background-color: #60fff7" colspan="2">
               <div >4</div>
           </td>
       </tr>
       <tr>
           <td style="background-color: #1528ff">
               <div >5</div>
           </td>
           <td style="background-color: #2dbebe">
               <div >6</div>
           </td>
       </tr>
   </table>

    <p>自定义表格，文字居中，最多换行2行</p>
<div class="table">
    <div class="table-row">
        <div class="table-cell custom" style="width: 30%">
            <span class="mul-ellipsis">            我热爱编程我热爱编程我热爱编程我热爱编程我热爱编程我热爱编程我热爱编程我热爱编程我热爱编程我热爱编程我热爱编程我热爱编程我热爱编程我热爱编程我热爱编程我热爱编程我热爱编程我热爱编程我热爱编程我热爱编程我热爱编程我热爱编程我热爱编程我热爱编程我热爱编程我热爱编程我热爱编程我热爱编程我热爱编程我热爱编程我热爱编程我热爱编程我热爱编程我热爱编程我热爱编程我热爱编程</div>
        </span>
        <div class="table-cell custom" style="width: 20%">2</div>
        <div class="table-cell custom">3</div>
        <div class="table-cell custom">4</div>
    </div>
    <div class="table-row">
        <div class="table-cell custom" style="width: 30%">
            <span class="mul-ellipsis">            我热爱编程我热爱编程我热爱编程我热爱编程我热爱编程我热爱编程我热爱编程我热爱编程我热爱编程我热爱编程我热爱编程我热爱编程我热爱编程我热爱编程我热爱编程我热爱编程我热爱编程我热爱编程我热爱编程我热爱编程我热爱编程我热爱编程我热爱编程我热爱编程我热爱编程我热爱编程我热爱编程我热爱编程我热爱编程我热爱编程我热爱编程我热爱编程我热爱编程我热爱编程我热爱编程我热爱编程</div>
        </span>
        <div class="table-cell custom" style="width: 20%">2</div>
        <div class="table-cell custom">3</div>
        <div class="table-cell custom">4</div>
    </div>
    <div class="table-row">
        <div class="table-cell custom" style="width: 30%">
            <span class="mul-ellipsis">            我热爱编程我热爱编程我热爱编程我热爱编程我热爱编程我热爱编程我热爱编程我热爱编程我热爱编程我热爱编程我热爱编程我热爱编程我热爱编程我热爱编程我热爱编程我热爱编程我热爱编程我热爱编程我热爱编程我热爱编程我热爱编程我热爱编程我热爱编程我热爱编程我热爱编程我热爱编程我热爱编程我热爱编程我热爱编程我热爱编程我热爱编程我热爱编程我热爱编程我热爱编程我热爱编程我热爱编程</div>
        </span>
        <div class="table-cell custom" style="width: 20%">2</div>
        <div class="table-cell custom">3</div>
        <div class="table-cell custom">4</div>
    </div>
    <div class="table-row">
        <div class="table-cell custom" style="width: 30%">
            <span class="mul-ellipsis">            我热爱编程我热爱编程我热爱编程我热爱编程我热爱编程我热爱编程我热爱编程我热爱编程我热爱编程我热爱编程我热爱编程我热爱编程我热爱编程我热爱编程我热爱编程我热爱编程我热爱编程我热爱编程我热爱编程我热爱编程我热爱编程我热爱编程我热爱编程我热爱编程我热爱编程我热爱编程我热爱编程我热爱编程我热爱编程我热爱编程我热爱编程我热爱编程我热爱编程我热爱编程我热爱编程我热爱编程</div>
        </span>
        <div class="table-cell custom" style="width: 20%">2</div>
        <div class="table-cell custom">3</div>
        <div class="table-cell custom">4</div>
    </div>
</div>

</body>
</html>